
#include <stdio.h>
#include <dlfcn.h>
#include "api_test.h"

int c_call_cpp()
{
	int (*dlfunc)();
	void *handle;
	int r = 0;

	handle = dlopen("libpack.so", RTLD_LAZY);     

	dlfunc = dlsym(handle, "pack_function");

	r =  dlfunc();
	dlclose(handle);
	return r ;
}

int main()
{
	printf("RETURN:%d!\n", c_call_cpp());
	return 0;
}
